var arr = new Array();
function api(name, url, artist, cover) {
    this.name = name;
    this.url = url;
    this.artist = artist;
    this.cover = cover;
}
for (i = 0; i < 15; i++) {
    $.ajax({
        async: false,
        type: "post",
        url: "https://api.uomg.com/api/rand.music",
        data: "sort=热歌榜&mid=2973483591&format=json",
        dataType: "JSON",
        success: function (response) {
            arr[i] = new api(
                response.data.name,
                response.data.url,
                response.data.artistsname,
                response.data.picurl);
        }
    });
}
var ap = new APlayer({
    container: document.getElementById('aplayer'),
    // mini:true,
    fixed: true,
    autoplay: false,
    theme: '#FADFA3',
    loop: 'all',
    order: 'random',
    preload: 'auto',
    volume: 0.7,
    mutex: true,
    listFolded: true,
    listMaxHeight: 90,
    lrcType: 3,
    audio: arr
});

